<template>
  <!-- <el-dialog
    :title="title"
    :width="1200"
    :footer="null"
    :visible="visible"
    fullscreen
    switchFullscreen
    @cancel="handleCancel"
    cancelText="关闭"> -->

  <div class="officePriview">
    <iframe
      :src="pdfUrl"
      type="application/x-google-chrome-pdf"
      width="100%"
      frameborder="0"
      scrolling="auto"
      height="100%"
    />
  </div>
  <!-- </el-dialog> -->
</template>

<script>

export default {
  name: 'Pdf',
  components: {

  },
  data() {
    return {
      title: '操作',
      visible: false,
      pdfUrl: ''
    }
  },
  created() {

  },
  mounted() {
    this.pdfUrl = this.$route.query.url
  },
  methods: {
    show(url) {
      this.pdfUrl = ''
      this.visible = true
      this.pdfUrl = url
    },
    close() {
      this.$emit('close')
      this.visible = false
    },
    handleCancel() {
      this.close()
    }
  }
}
</script>

<style lang="scss" scoped>
  .officePriview {
    width: 100%;
    height: 100%;
  }
  .ant-input {
    resize: none;
  }
  iframe{
    width: 100%;
    height: 100vh;
  }
</style>
